function diff = q_p_fun( m, param)

    diff = q_0_p_fun( m, param).*q_1_fun( m, param)+q_0_fun( m, param).*q_1_p_fun( m, param);
    if max(m)>=param.m_u
        diff(m>=param.m_u) = 0; 
    end
    if min(m)<param.m_l
        diff(m<param.m_l) = 0; 
    end

end